home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
130 MIDI Tool Box
/
130 MIDI Tool Box.iso
/
dac12x16
/
ftof.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-09-29
|
551b
|
19 lines
/* float to float conversion with buffer--useful sometimes
* ftofbuff < infile > outfile
*/
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#define BUFFSIZE 512 /* this buffsize requires larger stack,
e.g., cl /F5000 ftofbuff.c */
main()
{
float x[BUFFSIZE];
int numread, i;
setmode(fileno(stdin), O_BINARY);
setmode(fileno(stdout), O_BINARY);
while (numread = fread((char *)x, sizeof(float), BUFFSIZE, stdin))
fwrite((char *)x, sizeof(float), numread, stdout);
}